home *** CD-ROM | disk | FTP | other *** search
/ Alles Voor Internet / Tout Pour Internet / alles voor internet.iso / MacInternet™ / Modem / GVTele Folder / GV TelePort Serial 9600 < prev   
Text File  |  1993-01-26  |  6KB  |  276 lines

  1. ! 08/02/92 TelePort Gold draft
  2. ! 10/23/92 CTC Switched to new script written by RBH
  3. ! 10/26/92 CTC Fix for International calling(S7=60)
  4. ! 11/11/92 CTC Rewrote the Hang up section of the script to use AT\Y
  5. ! 12/07/92 CTC Fix for Shiva LanRover/L image 1.0 problem
  6. ! 01/26/93 JRM Altered to a 9600 connect
  7. !
  8. @ORIGINATE
  9. @ANSWER
  10. !
  11. ! Talk to the modem at 19,200 bps.  
  12. !
  13. serreset 19200, 0, 8, 1
  14. !
  15. ! &f    - recall factory settings
  16. ! &d0   - Ignore DTR
  17. ! &k3   - Enable Hardware flow control
  18. ! w2    - Connect result code reports modem speed
  19. ! \q3   - Use RTS/CTS flow control in full-duplex mode
  20. ! \k0   - Enter command state but do not send break
  21. ! \j0   - Disable port rate adjust
  22. ! s7=60 - To allow for an international call
  23. ! s37=9 - force 9600 baud connect (on Golds)
  24. !
  25. HSReset 0 1 0 0 0 1
  26. settries 0
  27. matchclr
  28. @LABEL 1
  29. matchstr 1 4 "OK\13\10"
  30. write "AT&f&d0s37=9&k3\\k0\\j0w2\\q3s7=60\13"
  31. matchread 30
  32. inctries
  33. iftries 2 59
  34. ! Modem is not responding, reset and send a break
  35. SBreak
  36. jump 1
  37. !
  38. ! Next, Set up the configuration: Turn off auto answer and command echo.   
  39. !
  40. ! S0=0 - Don't answer calls
  41. ! E0   - Turn command echo off
  42. @LABEL 4
  43. matchclr
  44. pause 5
  45. matchstr 1 5 "OK\13\10"
  46. write "ATS0=0E0\13"
  47. matchread 30
  48. jump 59
  49. !
  50. ! Note: When the "\Nn" commands of the TP Serial are like those of the PP we
  51. !       will need to change the \Nn setting to allow a V.42 connection without
  52. !       a fallback to MNP4
  53. !
  54. ! \n0 - disable v.42 autoreliable
  55. ! %c0 - turn off MNP5 compression
  56. @LABEL 5
  57. pause 5
  58. matchstr 1 6 "OK\13\10"
  59. write "AT\\n0%c0\13"
  60. matchread 30
  61. jump 59
  62. !
  63. !
  64. ! If speaker on flag is true, jump to label 8.  Else turn off the speaker
  65. !
  66. @LABEL 6
  67. ifstr 2 8 "1"
  68. pause 5
  69. matchstr 1 8 "OK\13\10"
  70. write "ATM0\13"
  71. matchread 30
  72. jump 59
  73. !
  74. ! The modem is ready so enable answering, or originate a call
  75. !
  76. @LABEL 8
  77. pause 5
  78. ifANSWER 30
  79. note "Dialing ^1" 3
  80. write "ATDT^1\13"
  81. !
  82. @LABEL 9
  83. matchstr 1  11 "CONNECT 1200\13\10"
  84. matchstr 2  12 "CONNECT 2400\13\10"
  85. matchstr 3  13 "CONNECT 4800\13\10"
  86. matchstr 4  19 "CONNECT 7200\13\10"
  87. matchstr 5  14 "CONNECT 9600\13\10"
  88. matchstr 6  20 "CONNECT 12000\13\10"
  89. matchstr 7  18 "CONNECT 14400\13\10"
  90. matchstr 8  50 "NO CARRIER\13\10"
  91. matchstr 9  50 "ERROR\13\10"
  92. matchstr 10 52 "NO DIAL TONE\13\10"
  93. matchstr 11 53 "BUSY\13\10"
  94. matchstr 12 54 "NO ANSWER\13\10"
  95. matchread 700
  96. jump 59
  97. !
  98. ! Notice that all we do for different connect speeds is issue a 
  99. ! "CommunicatingAt" command.  Remember, we locked the interface speed
  100. ! to 19,200 bps so we don't want to reset the serial speed after we connect.
  101. ! CommunicatingAt tells ARA what the actual line speed is so that it
  102. ! can set it's timers appropriately.  I guess your performance would be
  103. ! sub-optimal if you don't set this...
  104. !
  105. @LABEL 11
  106. note "Communicating at 1200 bps." 2
  107. CommunicatingAt 1200
  108. jump 15
  109. !
  110. @LABEL 12
  111. note "Communicating at 2400 bps." 2
  112. CommunicatingAt 2400
  113. jump 15
  114. !
  115. @LABEL 13
  116. note "Communicating at 4800 bps." 2
  117. CommunicatingAt 4800
  118. jump 15
  119. !
  120. @LABEL 19
  121. note "Communicating at 7200 bps." 2
  122. CommunicatingAt 7200
  123. jump 15
  124. !
  125. @LABEL 14
  126. note "Communicating at 9600 bps." 2
  127. CommunicatingAt 9600
  128. jump 15
  129. !
  130. @LABEL 20
  131. note "Communicating at 12000 bps." 2
  132. CommunicatingAt 12000
  133. jump 15
  134. !
  135. @LABEL 18
  136. note "Communicating at 14400 bps." 2
  137. CommunicatingAt 14400
  138. jump 15
  139. !
  140. !
  141. @LABEL 15
  142. HSReset 0 1 0 0 0 1 
  143. ifANSWER 16
  144. pause 30
  145. @LABEL 16
  146. exit 0
  147. !
  148. ! @ANSWER
  149. ! Set up the modem to answer
  150. !
  151. @LABEL 30
  152. write "ATS0=1\13"
  153. matchstr 1 31 "OK\13\10"
  154. matchread 30
  155. jump 59
  156. !
  157. @LABEL 31
  158. matchstr 1  32 "RING\13\10"
  159. matchstr 2  11 "CONNECT 1200\13\10"
  160. matchstr 3  12 "CONNECT 2400\13\10"
  161. matchstr 4  13 "CONNECT 4800\13\10"
  162. matchstr 5  19 "CONNECT 7200\13\10"
  163. matchstr 6  14 "CONNECT 9600\13\10"
  164. matchstr 7  20 "CONNECT 12000\13\10"
  165. matchstr 8  18 "CONNECT 14400\13\10"
  166. matchstr 9  50 "NO CARRIER\13\10"
  167. matchstr 10 50 "ERROR\13\10"
  168. matchstr 11 52 "NO DIAL TONE\13\10"
  169. matchstr 12 53 "BUSY\13\10"
  170. matchstr 13 54 "NO ANSWER\13\10"
  171. matchread 700
  172. jump 31
  173. !
  174. @LABEL 32
  175. userhook 1
  176. note "Answering phone..." 2
  177. jump 31
  178. !
  179. ! 50: error messages
  180. !
  181. @LABEL 50
  182. exit -6021
  183. !
  184. @LABEL 52
  185. exit -6020
  186. !
  187. @LABEL 53
  188. exit -6022
  189. !
  190. @LABEL 54
  191. exit -6023
  192. !
  193. @LABEL 59
  194. exit -6019
  195. !
  196. ! Hang up the modem
  197. !
  198. @HANGUP
  199. @LABEL 60
  200. settries 0
  201. serreset 19200, 0, 8, 1
  202. HSReset 0 1 0 0 0 1
  203. @LABEL 61
  204. !
  205. ! In order to hang up quickly, we go into command state and attempt a reliable
  206. ! connection. While we are attempting to re-establish
  207. ! the connection we hit return and cancel the attempt causing the modem to
  208. ! hang up.
  209. !
  210. SBreak
  211. pause 20            ! allow time for modem to return from break
  212. Flush               ! prevent disconnect garbage
  213. write "\13"         ! start on a clean line
  214. @LABEL 96
  215. matchclr
  216. matchstr 1 97 "OK\13\10"
  217. write "AT\13"
  218. matchread 30
  219. Pause 30
  220. inctries
  221. iftries 3 59
  222. jump 96
  223. @LABEL 97
  224. settries 0
  225. matchclr
  226. matchstr 1 62 "NO CARRIER\13\10"
  227. Flush                                  ! prevent disconnect garbage
  228. write "AT\\Y\13"                       ! Attempt to re-establish connection
  229. !pause 2                               ! Causes problems with LanRover/L 1.0
  230. @LABEL 98
  231. write "ho\13ho\13"                 ! Dreaded Christmas Abort re-connect
  232. inctries
  233. iftries 50 125
  234. Jump 98
  235. @LABEL 125
  236. matchread 150                      ! to hang up the modem
  237. @LABEL 62
  238. settries 0
  239. pause 100
  240. !
  241. ! recall the factory settings. (see note at top of script)
  242. !
  243. @LABEL 63
  244. matchclr
  245. matchstr 1 92 "OK\13\10"
  246. write "ATZ\13"
  247. matchread 30
  248. inctries
  249. iftries 3 59
  250. jump 63
  251. @LABEL 92
  252. Settries 0
  253. @LABEL 93
  254. matchclr
  255. matchstr 1 64 "OK\13\10"
  256. write "AT&f&d0&k3\\k0\\j0w2\\q3s7=60\13"
  257. matchread 30
  258. inctries
  259. iftries 3 59
  260. jump 93
  261. !
  262. ! Turn off auto answer.
  263. ! S0=0 - Don't try to answer the phone
  264. !
  265. @LABEL 64
  266. pause 5
  267. matchstr 1 65 "OK\13\10"
  268. write "ATS0=0\13"
  269. matchread 20
  270. !
  271. @LABEL 65
  272. exit 0
  273.